package com.koron.system.eform;

import com.koron.bean.base.Response;
import com.koron.bean.system.menu.MenuBean;
import com.koron.common.core.config.ThreadLocalContext;
import com.koron.system.menu.service.MenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/system/formstore")
@Api(tags = "efrom树")
public class FormStoreController {

    private String getCurrDs() {
        return ThreadLocalContext.get().getCurrDs();
    }

    @Autowired
    FormStoreServiceImpl formstoreserviceimpl;

    @Autowired
    MenuService menuservice;


    @ApiOperation(value = "获取 form地址 code前端标识 ")
    @GetMapping("/geteformUrl")
    public Response geteformUrl(@RequestParam("code") String code) {
        MenuBean menuBean = menuservice.queryByCode(code);
        return Response.success(menuBean);
    }



}
